package br.inf.solutions.apresentacoes.ssp.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import br.com.vexillum.model.CommonEntityActivated;
import br.com.vexillum.model.annotations.Validate;

@SuppressWarnings("serial")
@Entity
@Table(name = "itens_stealth_weapon")
public class ItensStealthWeapon extends CommonEntityActivated{
	
	@Validate(notNull = true)
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_weapon",  nullable = false, unique = false, updatable = false)
	private Weapon weapon;
	
	@Validate(notNull = true)
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_stealthweapon", nullable = false, unique = false, updatable = false)
	private StealthWeapon stealthWeapon;
		
	@Column(name = "returnDate", nullable = true, unique = false, updatable = true)
	private Date returnDate;

	@Validate(notNull = false)
	@Column(name = "open", nullable = false, unique = false, updatable = true)
	private Boolean open;

	public Date getReturnDate() {
		return returnDate;
	}

	public void setReturnDate(Date returnDate) {
		this.returnDate = returnDate;
	}

	public Boolean getOpen() {
		return open;
	}

	public void setOpen(Boolean open) {
		this.open = open;
	}

	public Weapon getWeapon() {
		return weapon;
	}

	public void setWeapon(Weapon weapon) {
		this.weapon = weapon;
	}

	public StealthWeapon getStealthWeapon() {
		return stealthWeapon;
	}

	public void setStealthWeapon(StealthWeapon stealthWeapon) {
		this.stealthWeapon = stealthWeapon;
	}
}